-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RTG] Add ISA assembly emission pass #8057
base: maerhart-rtgtest-instructions
Are you sure you want to change the base?
Conversation
44b5801
to
babe1f2
Compare
afd891b
to
fc18855
Compare
babe1f2
to
8ed5c6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo the StringSet.
|
||
LogicalResult emitInstruction(InstructionOpInterface instr) { | ||
os << llvm::indent(4); | ||
bool useBinary = unsupportedInstr.contains(instr->getName().getStringRef()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name internally is stored as an Attribute. A set over StringAttr would likely be more efficient than a StringSet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which obviously requires constructing StringAttrs for each unsupoorted instruction at initialization time, but that's a one time cost.
llvm::raw_ostream &os; | ||
|
||
/// Instructions to emit in binary. | ||
const llvm::StringSet<llvm::MallocAllocator> &unsupportedInstr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned above, a DenseSet is probably much faster.
No description provided.